/*
 * Project: Digital Wristwatch
 * Author: Zak Kemble, contact@zakkemble.co.uk
 * Copyright: (C) 2013 by Zak Kemble
 * License: GNU GPL v3 (see License.txt)
 * Web: http://blog.zakkemble.co.uk/diy-digital-wristwatch/
 */

#ifndef PCF8563_DEFS_H_
#define PCF8563_DEFS_H_

// I2C addresses
#define PCF8563I2C_W			0b10100010
#define PCF8563I2C_R			0b10100011

// Control register settings
//#define PCF8563BIT_EOSC		7
//#define PCF8563BIT_1HZ			6
//#define PCF8563BIT_CONV		5
//#define PCF8563BIT_RS1			4
//#define PCF8563BIT_RS2			3
//#define PCF8563BIT_INTCN		2
//#define PCF8563BIT_A2IE		1
//#define PCF8563BIT_A1IE		0

// Status register settings
//#define PCF8563BIT_EN32KHZ	3
//#define PCF8563BIT_A2F		1
//#define PCF8563BIT_A1F		0

// Control register
#define PCF8563ADDR_CTRL_1		0x00
#define PCF8563ADDR_CTRL_2		0x01

// Time registers
#define PCF8563ADDR_SECS			0x02
#define PCF8563ADDR_MINS			0x03
#define PCF8563ADDR_HRS			0x04
#define PCF8563ADDR_DATE			0x05
#define PCF8563ADDR_DAY			0x06
#define PCF8563ADDR_MONTH			0x07
#define PCF8563ADDR_YEAR			0x08

// Alarm 1 registers
#define PCF8563ADDR_ALARM1_MINS	0x09
#define PCF8563ADDR_ALARM1_HRS	0x0A
#define PCF8563ADDR_ALARM1_DATE	0x0B
#define PCF8563ADDR_ALARM1_DAY	0x0C

// Other registers
#define PCF8563ADDR_CLKOUT_CTRL	0x0D
#define PCF8563ADDR_TIMER_CTRL	0x0E
#define PCF8563ADDR_TIMER			0x0F

//#define PCF8563ADDR_CTRL			0x0E
//#define PCF8563ADDR_STATUS		0x0F
//#define PCF8563ADDR_AGING			0x10
//#define PCF8563ADDR_TEMPH			0x11
//#define PCF8563ADDR_TEMPL			0x12

#endif /* PCF8563_DEFS_H_ */